import request from '@/utils/request'
import axios from 'axios'

// 查询报送任务计划列表
export function listPlan(query) {
  return request({
    url: '/submit/plan/list',
    method: 'get',
    params: query
  })
}

// 查询报送任务计划详细
export function getPlan(taskPlanId) {
  return request({
    url: '/submit/plan/' + taskPlanId,
    method: 'get'
  })
}

// 检查报送数据是否有异常
export function check(submitPlanDataCheckVo) {
  return request({
    url: '/submit/plan/check',
    method: 'post',
    data: submitPlanDataCheckVo
  })
}


// 手动执行报送计划
export function handSubmit(taskPlanId) {
  return request({
    url: '/submit/plan/handSubmit/' + taskPlanId,
    method: 'get'
  })
}

// 查询报送数据
export function queryData(planDetailId) {
  return request({
    url: '/submit/plan/previewData/' + planDetailId,
    method: 'get'
  })
}

// 导入报送数据
export function importData(submitDataImportVo) {
  return request({
    url: '/submit/plan/importData',
    method: 'post',
    data: submitDataImportVo
  })
}
//获取报送数据模板
export function downloadTemplate(planDetailId) {
  return request({
    url: '/submit/plan/template/' + planDetailId,
    method: 'get'
  })
}
